// SetupXML.h: interface for the CSetupXML class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_SETUPXML_H__9EE95398_0D1C_498C_9F94_679AA8340512__INCLUDED_)
#define AFX_SETUPXML_H__9EE95398_0D1C_498C_9F94_679AA8340512__INCLUDED_

#include "atlbase.h"
#import "MSXML6.dll" rename_namespace("MSXML2")
#include <msxml2.h>

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000 

class CSetupXML
{
public:
	CSetupXML();
	virtual ~CSetupXML();

	BOOL Open(LPCTSTR lpszPathName = "user.xml");
	void	Save();
	BOOL AddID(LPCTSTR sID, LPCTSTR sPW);
	BOOL DelID(LPCTSTR sID, LPCTSTR sPW);
	BOOL FixPW(LPCTSTR sID, LPCTSTR sPW);
	void FindInfo(LPCTSTR sFindID, LPCTSTR sFindPW, BOOL *bID, BOOL *bPW);

protected:
	MSXML2::IXMLDOMDocument2Ptr		m_pDoc;
	CString m_sFileName;
	
	BSTR CharToBSTR(const char *conv );
	char *BSTRToChar(const BSTR conv);
};

#endif // !defined(AFX_SETUPXML_H__9EE95398_0D1C_498C_9F94_679AA8340512__INCLUDED_)